﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace SEPro2
{
    public partial class frmMain : DevComponents.DotNetBar.Office2007RibbonForm
    {
        private Ussimplefloder _ussimplefloder;
        private Usoutgoing _usoutgoing;
        private Uscoa _uscoa;
        private Uscustomer _uscustomer;
        private Usfloderproduct _usfloderproduct;
        private Ussimplecustomer _ussimplecustomer;
        private Usaddorder _usaddorder;
        private Usprintorder _usprintorder;
        private Uscore _uscore;
        private Uspacking _uspacking;

        public frmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            int CurrentWidth = Screen.PrimaryScreen.Bounds.Width;
            int CurrentHeight = Screen.PrimaryScreen.Bounds.Height;
        }



        private void buttonItem1_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Simplefloder";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Simplefloder");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _ussimplefloder = new Ussimplefloder(tabControl2, newTab);

            panel.Controls.Add(_ussimplefloder);
            tabControl2.SelectedTab = newTab;

        }

        private void buttonItem6_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Simpleproduct";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Simpleproduct");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _usfloderproduct = new Usfloderproduct(tabControl2, newTab);

            panel.Controls.Add(_usfloderproduct);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem5_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Customer";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Customer");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _uscustomer = new Uscustomer(tabControl2, newTab);

            panel.Controls.Add(_uscustomer);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem21_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void buttonItem2_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Outgoing";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Outgoing");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _usoutgoing = new Usoutgoing(tabControl2, newTab);

            panel.Controls.Add(_usoutgoing);
            tabControl2.SelectedTab = newTab;

        }

        private void buttonItem3_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Coa";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Coa");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _uscoa = new Uscoa(tabControl2, newTab);

            panel.Controls.Add(_uscoa);
            tabControl2.SelectedTab = newTab;




        }


        private void buttonItem7_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Simplecustomer";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Simplecustomer");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _ussimplecustomer = new Ussimplecustomer(tabControl2, newTab);

            panel.Controls.Add(_ussimplecustomer);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem8_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Addorder";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Addorder");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _usaddorder = new Usaddorder(tabControl2, newTab);

            panel.Controls.Add(_usaddorder);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem9_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Printorder";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Printorder");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _usprintorder = new Usprintorder(tabControl2, newTab);

            panel.Controls.Add(_usprintorder);
            tabControl2.SelectedTab = newTab;

        }

        private void buttonItem10_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Core";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Core");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _uscore = new Uscore(tabControl2, newTab);

            panel.Controls.Add(_uscore);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem11_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Packing";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Packing");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _uspacking = new Uspacking(tabControl2, newTab);

            panel.Controls.Add(_uspacking);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem22_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Simpleproduct";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Simpleproduct");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _usfloderproduct = new Usfloderproduct(tabControl2, newTab);

            panel.Controls.Add(_usfloderproduct);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem23_Click(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Simplecustomer";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Simplecustomer");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _ussimplecustomer = new Ussimplecustomer(tabControl2, newTab);

            panel.Controls.Add(_ussimplecustomer);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem7_Click_1(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Printorder";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Printorder");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _usprintorder = new Usprintorder(tabControl2, newTab);

            panel.Controls.Add(_usprintorder);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem6_Click_1(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Addorder";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }
            }
        }

        private void buttonItem8_Click_1(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Core";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Core");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _uscore = new Uscore(tabControl2, newTab);

            panel.Controls.Add(_uscore);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem9_Click_1(object sender, EventArgs e)
        {
            int c = tabControl2.Tabs.Count;
            for (int i = 0; i < c; i++)
            {
                string tabName = "Packing";
                if (tabControl2.Tabs[i].ToString() == tabName)
                {
                    tabControl2.SelectedTab = tabControl2.Tabs[i];
                    return;
                }

            }

            TabItem newTab = tabControl2.CreateTab("Packing");
            TabControlPanel panel = (TabControlPanel)newTab.AttachedControl;

            _uspacking = new Uspacking(tabControl2, newTab);

            panel.Controls.Add(_uspacking);
            tabControl2.SelectedTab = newTab;
        }

        private void buttonItem19_Click(object sender, EventArgs e)
        {

        }

        private void bt_exit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        
    }
}
